package com.jbm.onehome.iface;

import javax.persistence.*;
import com.jbm.core.iface.IAcross;
import java.sql.Date;

/**
 * Created by lyh on 2017-04-28.
 */
@Entity
@Table(name = "statistical_report", schema = "", catalog = "")
public class StatisticalReportEntity extends IAcross
{
	public StatisticalReportEntity()
	{
		super();
	}

	public StatisticalReportEntity(IAcross ia)
	{
		super(ia);
	}

    private static final long serialVersionUID = 7192964312773644140L;
    private Date dates;
    private Integer totalregister;
    private Integer newregister;
    private Integer cert;
    private Integer distribute;
    private Integer totalopen;
    private Integer sucess;
    private Integer failed;
    private String successrate;
    private Integer android;
    private Integer apple;
    private Integer persons;

    @Id
    @Column(name = "dates", nullable = true,  updatable = true)
    public Date getDates() {
        return dates;
    }

    public void setDates(Date dates) {
        this.dates = dates;
    }

    @Basic
    @Column(name = "totalregister", nullable = true,  updatable = true)
    public Integer getTotalregister() {
        return totalregister;
    }

    public void setTotalregister(Integer totalregister) {
        this.totalregister = totalregister;
    }

    @Basic
    @Column(name = "newregister", nullable = true,  updatable = true)
    public Integer getNewregister() {
        return newregister;
    }

    public void setNewregister(Integer newregister) {
        this.newregister = newregister;
    }

    @Basic
    @Column(name = "cert", nullable = true,  updatable = true)
    public Integer getCert() {
        return cert;
    }

    public void setCert(Integer cert) {
        this.cert = cert;
    }

    @Basic
    @Column(name = "distribute", nullable = true,  updatable = true)
    public Integer getDistribute() {
        return distribute;
    }

    public void setDistribute(Integer distribute) {
        this.distribute = distribute;
    }

    @Basic
    @Column(name = "totalopen", nullable = true,  updatable = true)
    public Integer getTotalopen() {
        return totalopen;
    }

    public void setTotalopen(Integer totalopen) {
        this.totalopen = totalopen;
    }

    @Basic
    @Column(name = "sucess", nullable = true,  updatable = true)
    public Integer getSucess() {
        return sucess;
    }

    public void setSucess(Integer sucess) {
        this.sucess = sucess;
    }

    @Basic
    @Column(name = "failed", nullable = true,  updatable = true)
    public Integer getFailed() {
        return failed;
    }

    public void setFailed(Integer failed) {
        this.failed = failed;
    }

    @Basic
    @Column(name = "successrate", nullable = true,  updatable = true, length = 30)
    public String getSuccessrate() {
        return successrate;
    }

    public void setSuccessrate(String successrate) {
        this.successrate = successrate;
    }

    @Basic
    @Column(name = "android", nullable = true,  updatable = true)
    public Integer getAndroid() {
        return android;
    }

    public void setAndroid(Integer android) {
        this.android = android;
    }

    @Basic
    @Column(name = "apple", nullable = true,  updatable = true)
    public Integer getApple() {
        return apple;
    }

    public void setApple(Integer apple) {
        this.apple = apple;
    }

    @Basic
    @Column(name = "persons", nullable = true,  updatable = true)
    public Integer getPersons() {
        return persons;
    }

    public void setPersons(Integer persons) {
        this.persons = persons;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StatisticalReportEntity that = (StatisticalReportEntity) o;

        if (android != null ? !android.equals(that.android) : that.android != null) return false;
        if (apple != null ? !apple.equals(that.apple) : that.apple != null) return false;
        if (cert != null ? !cert.equals(that.cert) : that.cert != null) return false;
        if (dates != null ? !dates.equals(that.dates) : that.dates != null) return false;
        if (distribute != null ? !distribute.equals(that.distribute) : that.distribute != null) return false;
        if (failed != null ? !failed.equals(that.failed) : that.failed != null) return false;
        if (newregister != null ? !newregister.equals(that.newregister) : that.newregister != null) return false;
        if (persons != null ? !persons.equals(that.persons) : that.persons != null) return false;
        if (successrate != null ? !successrate.equals(that.successrate) : that.successrate != null) return false;
        if (sucess != null ? !sucess.equals(that.sucess) : that.sucess != null) return false;
        if (totalopen != null ? !totalopen.equals(that.totalopen) : that.totalopen != null) return false;
        if (totalregister != null ? !totalregister.equals(that.totalregister) : that.totalregister != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = dates != null ? dates.hashCode() : 0;
        result = 31 * result + (totalregister != null ? totalregister.hashCode() : 0);
        result = 31 * result + (newregister != null ? newregister.hashCode() : 0);
        result = 31 * result + (cert != null ? cert.hashCode() : 0);
        result = 31 * result + (distribute != null ? distribute.hashCode() : 0);
        result = 31 * result + (totalopen != null ? totalopen.hashCode() : 0);
        result = 31 * result + (sucess != null ? sucess.hashCode() : 0);
        result = 31 * result + (failed != null ? failed.hashCode() : 0);
        result = 31 * result + (successrate != null ? successrate.hashCode() : 0);
        result = 31 * result + (android != null ? android.hashCode() : 0);
        result = 31 * result + (apple != null ? apple.hashCode() : 0);
        result = 31 * result + (persons != null ? persons.hashCode() : 0);
        return result;
    }
    @Transient
    public String startDate;
    @Transient
    public String endDate;

    @Transient
    public boolean back;
    @Transient
    public String method;
    @Transient
    public String errorinfo;
    @Transient
    public int count;
    @Transient
    public int start=0;
    @Transient
    public int pagesize=0;
    @Transient
    public Integer tableid;
}
